package com.zhiyou100.www.bbs.function.userinfo;

import com.zhiyou100.www.bbs.dao.TableUserDao;
import com.zhiyou100.www.bbs.entityclass.TableUser;

/**
 * @packageName: getUserInformation
 * @className: com.zhiyou100.www.bbs.function.userinfo
 * @Description: TODO 获取用户信息
 * @author: yang
 * @date: 2020/6/6
 */
public class GetUserInformation {
    public TableUser getOne(Object user) {
        TableUser tableUser = (TableUser) user;
        String userName = tableUser.getUserName();
        String userPwd = tableUser.getUserPwd();
        TableUserDao tableUserDao = new TableUserDao();
        int id = tableUserDao.getId(userName, userPwd);
        return tableUserDao.getOne(id);
    }
}
